<template>
  <el-table
    :data="tableArray"
    border
    style="width: 100%"
  >
    <el-table-column
      prop="level"
      label="医院级别"
      align="center"
    />
    <el-table-column
      prop="value"
      label="医疗服务项目金额"
      sortable
      align="center"
    />
    <el-table-column
      prop="count"
      label="医疗服务项目数量"
      sortable
      align="center"
    />
    <el-table-column
      prop="rate"
      label="总费用占比"
      sortable
      align="center"
    />
  </el-table>
</template>
<script>
export default {
  props: {
    tableData: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  data() {
    return {
      tableArray: []
    }
  },
  watch: {
    tableData: {
      immediate: true,
      handler(val) {
        this.tableArray = val
      }
    }
  }
}
</script>
